﻿using System;
using System.Data;
using System.Data.SqlClient;
using System.Configuration;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.HtmlControls;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Xml.Linq;
using ADO;


namespace Service.Email
{
    /// <summary>
    ///Class1 的摘要说明
    /// </summary>
    public class Cmassageload
    {
        public string m_massage;//信息内容
        public string m_massagetitle;//信息标题
        public int m_sort;//信息分类
        public Cmassageload()
        {
            m_massage = null;
            m_sort = 0;
            m_massagetitle = null;
            //
            //TODO: 在此处添加构造函数逻辑
            //
        }
        public Cmassageload(int sort, string massage, string massgetitle)
        {

            m_massage = massage;
            m_sort = sort;
            m_massagetitle = massgetitle;
            //将信息的分类与内容传入对象
        }
        public bool Savemassage(int sort, string massage, string massgetitle)
        {
            bool ex;//判断数据库操作是否成功
            string sql;//数据库操作语句
            string str;//数据库连接参数
            str = "Server=YourSQLServer;user id=sa;password=;initial catalog=Northwind;Connect Timeout=30";
            DataBaseAccess st = new DataBaseAccess(str);
            sql = "insert into 表名() values(massage,sort,massagetitle)";
            ex = st.ExecuteDataBase(sql);
            return ex;


            //将信息保存入数据库
        }

    }
}
